# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-xlsxwriter
_pkgname=XlsxWriter
pkgver=1.2.6
pkgrel=1
pkgdesc='A Python module for creating Excel XLSX files.'
arch=('any')
url='https://pypi.org/project/XlsxWriter/#files'
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/XlsxWriter-$pkgver.tar.gz")
sha512sums=('e2743d4b8147558d15e901772b93e52abb1c35664360a16d25cb040593143df58cc997ad5aab52711885d2ed51a6566377f955c358573dbb8510f68e8126cd4a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/vba_extract.py" "$pkgdir/usr/bin/vba_extract2.py"
}

